<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <link href="../../project/css/bootstrap.css" rel="stylesheet" media="screen">
    <link href="css/font-awesome.css" rel="stylesheet">
    <link href="css/mystyle.css" rel="stylesheet">
    <title></title>
</head>
<body>
<div class="container">
    <div class="page-header"><h2>WebSocket</h2></div>
    <div class="container">
        <form class="">
            <div class="form-group">
                <span></span>
                <input class="form-control" name="area">
            </div>
        </form>
    </div>
</div>
</body>
<script>
    $(document).ready(function () {
        var websocket = new WebSocket("ws://localhost:8099/WebSocket.php");
        websocket.onopen = function (ev) {
            alert("Успешно соеденено");
        };
        websocket.onclose = function (ev) {
            alert("Соеденение закрыта");
        };
        websocket.onmessage = function (ev) {
            alert('Message: '+ev.data());
        };
        websocket.onerror = function (ev) {
            alert('Error: '+ev.data());
        };
    });
</script>

<script src="../../project/js/jquery-1.10.2.js"></script>
<script src="../../project/js/bootstrap.js"></script>
</html>